﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="CircularMenuScatterViewItemStyle" BasedOn="{StaticResource BaseScatterViewItemStyle}" TargetType="{x:Type s:ScatterViewItem}">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
                    <GradientStop Color="#FFA4B4BD" Offset="0"/>
                    <GradientStop Color="#FFDFE9EE" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="#33000000"/>
        <Setter Property="Foreground" Value="#FF515151"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="MinWidth" Value="48"/>
        <Setter Property="MinHeight" Value="48"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type s:ScatterViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="ActivationTimeline">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                            </DoubleAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.182,0.441"/>
                            </PointAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.929,0.949"/>
                            </PointAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="DeactivationTimeline">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                            </DoubleAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.241,0.304"/>
                                <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="-0.636,0.132"/>
                                <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-1.146,-0.035"/>
                            </PointAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.879,0.551"/>
                                <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="0.018,0.291"/>
                                <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-0.492,0.124"/>
                            </PointAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid x:Name="container" RenderTransformOrigin="{TemplateBinding RenderTransformOrigin}">
                        <Grid.RenderTransform>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                        </Grid.RenderTransform>
                        <Border x:Name="contentBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="360" HorizontalAlignment="Stretch" Background="Transparent">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </Border>
                        <Rectangle x:Name="Sheen" RadiusX="360" RadiusY="360" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="False" IsHitTestVisible="False" Opacity="0.6">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="-0.234,0.37" StartPoint="-0.981,-0.138">
                                    <GradientStop Color="Transparent" Offset="0"/>
                                    <GradientStop Color="#33FFFFFF" Offset="0.52"/>
                                    <GradientStop Color="Transparent" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsActive" Value="True"/>
                                <Condition Property="ShowsActivationEffects" Value="True"/>
                            </MultiTrigger.Conditions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard x:Name="DeactivationTimeline_BeginStoryboard">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                            <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.241,0.304"/>
                                            <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="-0.636,0.132"/>
                                            <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-1.146,-0.035"/>
                                        </PointAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                            <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.879,0.551"/>
                                            <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="0.018,0.291"/>
                                            <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-0.492,0.124"/>
                                        </PointAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard x:Name="ActivationTimeline_BeginStoryboard">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                            <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                            <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                            <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.182,0.441"/>
                                        </PointAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                            <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.929,0.949"/>
                                        </PointAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" TargetName="contentBorder">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
                                        <GradientStop Color="#4CA4B4BD" Offset="0"/>
                                        <GradientStop Color="#4CDFE9EE" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="#A5333333"/>
                            <Setter Property="BorderBrush" Value="#33000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>